dsh-cache-cost-monitor:为 DSH 增加缓存命中率与费用观察
`dsh-cache-cost-monitor` 是 DSH v0.1.x 的 MIT 许可插件,用于监控 Agent 调用中的前缀缓存命中率和 API 费用。它通过提取 `prompt_cache_hit_tokens`、`prompt_cache_miss_tokens` 和 `completion_tokens` 字段,实时统计缓存命中率,并根据官方定价(含峰谷时段)预估成本。插件提供 `cache_report` 工具供 Agent 查询详细报告,支持趋势火花线和逐轮明细;同时在浏览器端显示常驻统计条及每条回复末尾的本轮消耗。此外,它支持阈值与预算告警,并在异常时自动降级以保障主程序稳
Read MoreDSH Cache Precision: Display Three-Decimal Cache Hit Rate in DSH Web and Relax Composer Statistics Line
dsh-cache-precision is a DSH Web plugin (v0.1.1, MIT license) maintained by Cheng-cheng9669, designed to enhance the built-in statistics display in the composer dock in place. This plugin primarily addresses two specific issues: first, it improves cache hit rate display from integer percentages to three-decimal precision (e.g., changing 12% to 12.345%); second, it widens the statistics row to prevent items from being truncated as "...". Its core mechanism reads the same tokenUsage projection and automatically reapplies after React re-renders to ensure display consistency. During installation, you need to confirm the local plugin directory (e.g., D:\Dsh\tools\dsh-cache-precision) and execute `dsh plug
Read More